package com.ruoyi.project.personal.signature.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.personal.signature.mapper.UserSignatureMapper;
import com.ruoyi.project.personal.signature.domain.UserSignature;
import com.ruoyi.project.personal.signature.service.IUserSignatureService;

/**
 * 个性签名Service业务层处理
 * 
 * @author wyh
 * @date 2024-06-16
 */
@Service
public class UserSignatureServiceImpl implements IUserSignatureService 
{
    @Autowired
    private UserSignatureMapper userSignatureMapper;

    /**
     * 查询个性签名
     * 
     * @param id 个性签名主键
     * @return 个性签名
     */
    @Override
    public UserSignature selectUserSignatureById(Long id)
    {
        return userSignatureMapper.selectUserSignatureById(id);
    }

    /**
     * 查询个性签名列表
     * 
     * @param userSignature 个性签名
     * @return 个性签名
     */
    @Override
    public List<UserSignature> selectUserSignatureList(UserSignature userSignature)
    {
        return userSignatureMapper.selectUserSignatureList(userSignature);
    }

    /**
     * 新增个性签名
     * 
     * @param userSignature 个性签名
     * @return 结果
     */
    @Override
    public int insertUserSignature(UserSignature userSignature)
    {
        userSignature.setCreateTime(DateUtils.getNowDate());
        return userSignatureMapper.insertUserSignature(userSignature);
    }

    /**
     * 修改个性签名
     * 
     * @param userSignature 个性签名
     * @return 结果
     */
    @Override
    public int updateUserSignature(UserSignature userSignature)
    {
        userSignature.setUpdateTime(DateUtils.getNowDate());
        return userSignatureMapper.updateUserSignature(userSignature);
    }

    /**
     * 批量删除个性签名
     * 
     * @param ids 需要删除的个性签名主键
     * @return 结果
     */
    @Override
    public int deleteUserSignatureByIds(Long[] ids)
    {
        return userSignatureMapper.deleteUserSignatureByIds(ids);
    }

    /**
     * 删除个性签名信息
     * 
     * @param id 个性签名主键
     * @return 结果
     */
    @Override
    public int deleteUserSignatureById(Long id)
    {
        return userSignatureMapper.deleteUserSignatureById(id);
    }
}
